package wbhproject.tools;

import java.util.Date;

import org.apache.log4j.Logger;

public class Configuration {

	static Logger log = Logger.getLogger(Configuration.class);
	private static Configuration instance;
	private Date myBirthDate;
	private String myDataSourceContext = "java:/comp/env/jdbc/testDB";
	private long measureRequestInterval = 3000;

	private Configuration() {
		// Remember the time, when instance was created
		myBirthDate = new Date();
	}

	public static Configuration getInstance() {
		if (instance == null) {
			// Singleton with double-checked locking
			synchronized (Configuration.class) {
				if (instance == null) {
					instance = new Configuration();
				}
			}
		}
		return instance;
	}

	public Date getBirthDate() {
		return myBirthDate;
	}
	
	public String getDataSourceContext() {
		return myDataSourceContext;
	}
	
	public long getMeasureRequestInterval() {
		return measureRequestInterval;
	}
	

}
